package com.sphd.emanu.activity.topupmonth;

import com.sphd.emanu.mvp.BasePresenterImpl;
import com.sphd.emanu.pojo.DayDepositSale;
import com.sphd.emanu.pojo.MonthDepositSale;
import com.sphd.emanu.utils.GsonUtil;
import com.wzutils.L;

import retrofit2.Call;
import retrofit2.Callback;
import retrofit2.Response;

/**
 * MVPPlugin
 *  邮箱 784787081@qq.com
 */

public class TopupmonthPresenter extends BasePresenterImpl<TopupmonthContract.View> implements TopupmonthContract.Presenter{

    @Override
    public void saleMonthDepositSum(Integer org) {
        emanuService.saleMonthDepositSum(org).enqueue(new Callback<String>() {
            @Override
            public void onResponse(Call<String> call, Response<String> response) {
                L.e(response.toString());
                    mView.recBean(GsonUtil.GsonToBean(response.body(), MonthDepositSale.class));
            }

            @Override
            public void onFailure(Call<String> call, Throwable t) {
                Error(t);
            }
        });
    }


}
